package cn.itcast.service;

import cn.itcast.pojo.*;

import java.util.List;
import java.util.Map;

public interface orderService {
//    List<order> getAllOrder(String openId);  //获取所有订单
//    List<order> getAllOrderByCondition(Integer orderStatus,String openId);  //根据条件获取订单信息
    boolean delectOrder(Integer orderId,String explain);  //删除订单
//    boolean updateOrder(order order);

    boolean addOrder(order order,String productId);

    boolean merchantaddOrder(order order,String productId);

    boolean addImgPath(String path, String number);

    List<order> findOrder(String orderStatus, String openId);

    List<order> findUserOrder(String orderStatus, String openId);

    Integer productOrder(temporaryOrder temporaryOrder);

    Integer productOrderItem(temporaryOrderItem temporaryOrderItem);

    boolean productuploadOrder(String path, Integer orderItemId);

    boolean accessoryuploadOrder(String path, Integer orderItemId);

    List<temporaryOrder> temporaryfindAllOrder(Integer page, Integer limit, String select, String value);

    List<temporaryOrderItem> temporaryfindOrderItem(Integer orderId);

    boolean addRecharge(recharge recharge);

    boolean updateRecharge(recharge recharge);

    List<order> findStatusOrder(String orderStatus);

    Map<String, List<order>> findDistributionOrder(String openId);

    Integer findUserUnfinishOrder(String openId);

    /**
     * @Description:  查看昨日下单情况
     *
     * @auther: 张松
     * @date: 11:44 2020/6/25
     * @param: []
     * @return: java.util.List<cn.itcast.pojo.order>
     *
     */
    List<order> getYesterdayOrder();


    /**
     *
     * @Description: 查看每日订单情况
     *
     * @auther: 张松
     * @date: 9:20 2020/7/18
     * @param: []
     * @return: java.util.List<cn.itcast.pojo.order>
     *
     */
    List<order> getEveryDayOrder(Integer intDate);

    /**
     *
     * @Description:  获取昨天下单的总重量和总金额
     *
     * @auther: 张松
     * @date: 11:49 2020/6/25
     * @param: []
     * @return: java.util.List<cn.itcast.pojo.order>
     *
     */
    List<orderItem> getYesterdayOrderWeightAndMoney();


     /**
     *
     * @Description:   获取昨天下单的分类重量和金额
     *
     * @auther: 张松
     * @date: 14:42 2020/6/29
     * @param: []
     * @return: java.util.List<cn.itcast.pojo.orderItem>
     *
     */
    List<orderItem> getYesterdayOrderWeightAndMoneyAndProductType();

    List<orderItem> getEverydayOrderWeightAndMoneyAndProductType(int everyDay);

    /**
     * 功能描述: <br>
     * 〈查看订单的上一个接单骑手〉
     * @Author: lyy
     * @Date: 2020/8/9 17:38
     * @Param: [openId]
     * @Return: java.lang.String
     */
    String userPreviousHorseman(String openId);
}
